
module Constants where

import Data.Word

-- Options

data Options = Options
    { optVerbose     :: Bool
    , optShowVersion :: Bool
    , optTestMain    :: Bool
    , optYieldCurves :: Maybe Int
    , optLoadCheckpoint :: Maybe FilePath
    , optStopAt      :: Maybe Int
    , optOutput      :: Maybe FilePath
    } deriving Show

defaultOptions = Options
     { optVerbose     = False
     , optShowVersion = False
     , optTestMain    = False
     , optYieldCurves = Nothing
     , optLoadCheckpoint = Nothing
     , optStopAt = Nothing
     , optOutput = Nothing
    } 

-- these are periods, not frequencies !
checkPointFrequency = 100::Int
cleanupFrequency = 250::Int
accountingFrequency = 20::Int
outCrossFrequency = 500::Int

parallelStreams = 1::Int

costFactor = 0.00016::Double -- 0.004c per operation 

maxProposalAttempts = 10::Int

-- Mutator constants

-- x == x% chance of action 

tweakBias = 90 :: Int -- from 0 to 100 - less than this we tweak, otherwise mutate
haltMutationBias = 20 :: Int -- from 0 to 100 - less than this we halt selection, otherwise continue tree exploration
addIfBias = 30 :: Int -- from 0 to 100 - less than this we add an if statement , otherwise ordinary mutation


checkPointString = "LoanSimCheckpoint1" :: String
typesVersion = "0.05"::String

managementPolicyRegisters = 10::Int

miy = 12::Int

maxEvaluationDepth = 50::Int

prngSeed = 10028190::Word32

-- originals used in development by randomly hitting numpad
fewPrngSeeds = [1209378,342092341,45789021789,9238923410,234890342890,231890231890,231890231890,213231890,231302130] :: [Word32] 

-- 1000 random numbers from random.org
prngSeeds = 
   [
   9785010,92732760,84129073,16619070,42253837,
   59164453,49208644,46765842,87318197,12126562,
   43646054,94332010,96503124,69941797,27678004,
   64959943,33408910,48867622,58543615,56156098,
   45350994,80357145,12478979,80301011,7110597,
   49159778,53207188,73913895,92832243,23806490,
   15492232,28774857,53207605,65246935,31407871,
   4695444,86878479,54225723,98873520,73538872,
   25677509,34267714,75917177,80496383,73354596,
   44998558,65163118,35835043,45507016,84041587,
   79678592,23979288,38552558,26701124,84417452,
   63422264,9326764,69179586,98201987,83675247,
   65866630,74209688,71013171,63531462,1708430,
   60748221,7389857,98886210,40108427,57450357,
   29715425,54361206,21254946,74819154,49156130,
   35643575,51087861,34378198,12921913,55701137,
   95645509,24446744,39166498,58794007,54634550,
   53490372,26463582,25821577,92536276,8926930,
   75515596,27245547,55957931,67644627,94629823,
   28701705,59572666,97154841,94688350,64064655,
   22638202,51837187,19559957,37764302,47255287,
   69819483,65854414,54668645,77581706,4631219,
   39229846,32644210,37756479,83194169,99374129,
   22512053,69704887,20968241,23724910,76111912,
   69722399,27727069,50263027,41566503,86247251,
   40581984,61308484,13345958,8769744,46410993,
   36113873,55530124,51905774,21161664,45767736,
   22229077,77360399,75545265,65180953,80178583,
   83910463,73480367,82990885,26358138,51716338,
   92620098,30118465,87446199,40643992,71534287,
   98059701,85974969,10314234,27397657,46779758,
   22573576,76074156,487644,5054370,92808059,
   79951373,88021535,23456216,94507487,398000,
   38381412,61190485,17735543,86397773,66593051,
   37168237,63560706,45296894,8855405,48997807,
   97166559,83978182,8395522,91029347,57747536,
   39452468,40859389,68803499,42587421,41767109,
   40332058,36503944,45668396,46478200,49429002,
   64414311,3955203,86326980,40124055,18029464,
   41979838,1646933,76467023,77556273,12760319,
   48713432,96236990,21874261,18276123,88599866,
   68840773,92641530,83768284,28240593,35108856,
   14669355,71962148,87894267,38244709,8334332,
   24497062,66479397,99877161,20590921,16525323,
   10205005,83181795,70172009,92981231,3427999,
   22928519,66829093,11130042,27194865,30442340,
   84773648,5410167,25202802,37192681,22515598,
   81500447,29511322,56720971,35623740,78602376,
   96088454,78946295,66405594,71689533,71293434,
   32939310,77204826,43561484,2663828,29111385,
   96505019,18926927,69766466,19071256,11586122,
   22234114,63594961,45810925,73995582,60280877,
   36570625,84457894,50762038,70796558,75252134,
   59357244,67737867,70995749,92594871,63111416,
   44785788,14037569,7742631,35351043,7027843,
   44270290,98877018,80832449,43200050,64081844,
   97427497,81714248,51332533,48085353,2213969,
   43164254,72428777,8989899,89324443,13472524,
   19180679,32414759,44936327,88979599,97468047,
   84457102,50289351,99815178,4662626,25949479,
   73754517,67899576,39242791,70293892,59867317,
   33867115,36670847,54622152,32388295,90765591,
   70214451,41919319,2156049,83108601,63780099,
   67943411,60791766,25605188,28796185,82258474,
   47196576,86103559,39156294,86987576,84761571,
   38215376,52672169,16494357,68859897,30851337,
   5061542,74287049,95002417,58155403,73564370,
   92748450,43942132,93698916,92547486,9687261,
   12968496,55891614,64304252,25630191,37783045,
   32949988,68777908,48467161,23717847,40132861,
   88865416,19067498,61074063,79952279,97557346,
   80141193,53190833,14937360,25472809,52183382,
   72492547,21938788,28409203,79121678,74374993,
   15756613,85854144,50033723,24548182,99334503,
   13292388,83854912,37054727,95165180,45270524,
   89104913,49556733,38342709,59480414,20253244,
   91227354,11752990,98857201,9049492,60409265,
   80685720,38907345,36482069,24888734,56236602,
   52168294,99736208,98593108,88861187,92594357,
   30000144,56350462,92557433,97543048,64239819,
   88533913,62063871,95348222,86863625,90121593,
   14956332,90270714,24314191,88603016,23307302,
   41997309,25432202,36139044,15517961,70268090,
   27433697,41870550,1242160,46194980,45338393,
   29373941,44054115,17803593,70544454,41229120,
   34781616,54797835,70320593,88159050,55600344,
   77505941,3366955,30858889,54506519,10588988,
   85932701,74999638,3874505,93434153,56299650,
   30248091,98701715,72719696,62725858,44715817,
   97536773,58014301,68196563,94556869,8187000,
   60581176,25482350,73222062,9495914,67811224,
   22859097,33786526,22281017,79486733,53571953,
   76201177,23211010,84430677,9445201,17750800,
   13576452,81950802,22383985,4577594,30554253,
   21766752,32015673,56086219,54855560,37832770,
   39049933,58337893,34306557,90116925,79142889,
   42345507,96654445,20898045,82210921,64655572,
   46452676,71258452,63824788,92403547,51494270,
   95759418,52152390,83545390,64501536,37465754,
   82979687,55431764,6507251,9107355,40845521,
   24947225,52654876,4131408,33039087,79196573,
   19407376,13592015,78092376,24411183,64551670,
   41901132,21297572,98019643,27335299,78965719,
   48069976,16363417,4520645,2404315,64249220,
   88552105,55435933,69256985,55863170,87268165,
   43153517,4989023,65105335,14338623,63877335,
   80492695,51904058,26304564,18837710,4031157,
   77939293,71455296,45283919,89117899,44159838,
   95777037,29012240,35052078,88210919,12276839,
   83316423,60754438,75404322,21314803,1272979,
   77608466,186522,82740715,90781096,24365742,
   47214647,78336250,39726475,7241984,47601925,
   44577740,9420997,54792254,45045565,20094036,
   52565687,75453394,59001852,58165671,30502095,
   31986457,79482504,50674445,20622131,18663641,
   62412618,13125153,72284200,34514206,96938782,
   56878708,83797777,53505269,58200908,51139695,
   28987944,84204147,75401238,99015937,48307624,
   28274060,15091258,2235187,60361928,89044677,
   89297323,30381034,39372208,58813418,98022238,
   3449068,91969295,36354750,71926887,1900427,
   13011544,7610235,68608503,8330089,57277870,
   24220901,16196843,75533510,18839106,52168398,
   59081665,68259217,93209702,57376535,30494474,
   23107747,68260956,60601034,1234005,86134379,
   83431969,65801326,51851639,19761276,10662410,
   71153202,93656115,61782211,44654302,72391155,
   15011599,2081373,2724605,54602689,96911590,
   57142845,66974064,20592812,362348,46215032,
   80968836,88944339,39538347,2510602,17718988,
   62275396,71809976,50744322,50920013,1846615,
   82980900,95045464,6005865,52433901,60782925,
   28389552,69504571,41267430,18592717,67823594,
   98812170,50142330,34796939,26518244,9722921,
   88534349,74487795,47319669,18749020,99558086,
   9609962,80384182,29471727,1433134,54054680,
   46188011,40460569,91649420,89408777,11916649,
   10505045,44973988,17480037,70339916,66962091,
   36566222,96707372,72773324,89008516,16598077,
   22607768,781454,13157577,37810436,56692241,
   52988603,18264201,98684712,55246505,6585873,
   997134,93442019,61900405,28995837,75942152,
   4474928,48922536,23440760,28159233,98432464,
   59276575,11444844,17300728,78981639,69077597,
   78732055,87240661,1306101,27322758,60101732,
   59546827,33994651,25066496,40088508,25894382,
   28500611,83767315,60654824,80549931,599079,
   79325865,12289053,3620978,50261443,8540645,
   87325405,12565742,46327265,79347537,44813545,
   8823794,20710008,7029634,20154432,29755329,
   5242335,79688510,105945,12359030,15734967,
   29228139,61111820,34657614,16325635,548896,
   50897087,41063604,87087961,14857282,58431819,
   25346680,62968006,90059840,60445507,21527020,
   12689552,18780581,43276221,16145941,76849175,
   98265941,29447862,94483528,31520691,20762255,
   64550355,50094315,74777393,38339681,91541464,
   32182614,89131862,57037396,86112586,45867111,
   61970072,17144138,59161232,93448685,18695133,
   30464233,33394439,99123238,84146480,25535894,
   82219196,68781143,32052310,4565237,76774436,
   35191697,11108482,44946804,96446806,29923659,
   24985173,59097742,27338957,75849953,50035145,
   69910870,58618126,34132875,35699265,11510750,
   32273863,29529240,99905400,13037364,47818169,
   77304503,85915096,83709380,22091715,8369220,
   1936284,19698020,75027330,8942099,58486809,
   5840921,39823497,41945940,3453781,62297506,
   95399664,90357265,34761058,84899408,80763180,
   20777611,74978299,18551461,20686508,63507996,
   12543786,76430012,68054498,50350834,51458486,
   37649657,71665283,96665134,70729681,83257376,
   3952874,51707646,40927982,33114012,12529286,
   80122995,80225192,83404332,92199056,65731313,
   22897869,76605769,75972256,12052389,70146810,
   31526547,23102478,9342778,30252141,82824608,
   33428228,9517048,95175541,35128884,13111872,
   76767134,2697890,9252912,48650076,49024891,
   73857403,47579469,17638919,3545858,95588919,
   55399984,78577103,38036187,73340888,46418842,
   36465748,48290148,62471993,79206473,26093904,
   10686142,96277365,25443505,44110137,93775746,
   57140266,2153836,36448507,48975156,37186361,
   72865820,62747677,10572769,14473050,56702254,
   43927334,67943521,9022563,23407436,22512002,
   96018717,81663707,9976171,16150934,33562411,
   46258750,56659302,81267434,99428152,74829027,
   38476115,37860385,86421874,72683449,90152110,
   59049335,83200521,36094892,92409998,21035182,
   34698345,81113076,10188042,50192391,98971626,
   25138401,75330397,31882135,97292635,82953241,
   36436213,67936349,51054839,80218143,43795063,
   63030866,22604142,94641077,15882183,17307553,
   63917881,99435440,54149052,99096063,36296138,
   57439538,34286554,74396627,57748027,56194010,
   91938110,41647035,1295678,18083263,38524260,
   54409338,44208266,5542400,53240072,37237844,
   56039334,90333292,18646040,44486061,50056492,
   87807065,5467596,43773249,41455357,34872759,
   25142421,43701156,65574152,6167574,21923613] :: [Word32]

